<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class ArticleCategories extends Model
{
    //
    protected $dates=['deleted_at'];
    public $timestamps=false;
    protected $primaryKey='article_category_id';
    protected $table='article_categories';
    const UPDATED_AT = 'updated_at';
    const CREATED_AT = 'created_at';
    protected $dateFormat='Y-m-d H;i:s';
    protected $fillable=[
        'article_category_name',
        'parent_id',
        'order',
        'ctype',
        'is_visible',
        'created_by',
        'updated_by',
    ];

    //对应文章
    public function articles(){
        return $this->hasMany(Article::class,'article_category_id','article_category_id');
    }
}
